<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ page contentType="text/html" isELIgnored="false" pageEncoding="UTF-8"%>
<%@ page import="org.apache.commons.lang.StringUtils"%> 
  
<h1><spring:message code="login.titre" /></h1>
  
<c:if test="${not empty SPRING_SECURITY_LAST_EXCEPTION.message}"><p class="error">${SPRING_SECURITY_LAST_EXCEPTION.message}</p></c:if> 
<spring:hasBindErrors name="loginForm">
	<c:forEach items="${errors.globalErrors}" var="error">
		<spring:message code="${error.code}" arguments="${error.arguments}"	text="${error.defaultMessage}" />
	</c:forEach>
</spring:hasBindErrors>
  
  
  
<form:form class="form" method="POST" action="connexion" commandName="loginForm">
	        
	        <p>
				<form:label for="username" path="username"><spring:message code="login.identifiant"></spring:message></form:label>
				<form:input path="username"  name='username'/>
			    <form:errors path="username" class="error" /> 
	   		</p>
	   
	 	 	 <p>
				<form:label for="password" path="password"><spring:message code="login.password"></spring:message></form:label>
				<form:password path="password" name='password' />
				<form:errors path="password" class="error" /> 
	  		</p>
	  
	  		<input name="submit" type="submit"	value="<spring:message code="login.connexion"/>" />
			 
</form:form> 

  
 <a href="<spring:url value="/compte-utilisateur/creation"/>"><spring:message code="login.conseilCreationDeCompte" /> </a>


